# # 打印 1-10
# num = 1
# while num <= 10:
#     print(num)
#     num += 1

# # 计算 1-100 的和
# sum = 0
# num = 1
# while num <= 100:
#     sum += num
#     num += 1
# print(sum)

# # 计算 5 的阶乘
# result = 1
# n = 1
# while n <= 5:
#     result *= n
#     n += 1
# print(result)

# 求 1!+2!+3!+4!+5!
num = 1
sum = 0
while num <= 5:
    factorResult = 1
    i = 1
    while i <= num:
        factorResult *= i
        i += 1
    sum += factorResult
    num += 1
print(sum)